package com.ruoyi.custom.domain.encryption;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 加解密环境配置
 * </p>
 *
 * @author xudm
 * @since 2024-06-30
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("encrypt_envconfig")
public class EncryptEnvconfig extends Model<EncryptEnvconfig> {

    /**
     * 配置Id
     */
    @TableId(value = "config_id", type = IdType.ASSIGN_ID)
    private String configId;

    /**
     * 配置名称
     */
    @TableField("config_name")
    private String configName;

    /**
     * 加密算法
     */
    @TableField("encrypt_type")
    private String encryptType;

    /**
     * 请求公钥
     */
    @TableField("request_publickey")
    private String requestPublicKey;

    /**
     * 请求私钥
     */
    @TableField("request_privatekey")
    private String requestPrivateKey;

    /**
     * 响应公钥
     */
    @TableField("response_publickey")
    private String responsePublicKey;

    /**
     * 响应私钥
     */
    @TableField("response_privatekey")
    private String responsePrivateKey;

    /**
     * 创建人
     */
    @TableField(value = "created_by", fill = FieldFill.INSERT)
    private Long createdBy;

    /**
     * 创建时间
     */
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    private LocalDateTime createdTime;

    /**
     * 更新人
     */
    @TableField(value = "updated_by", fill = FieldFill.INSERT_UPDATE)
    private Long updatedBy;

    /**
     * 更新时间
     */
    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedTime;

    public static final String CONFIG_ID = "config_id";

    public static final String CONFIG_NAME = "config_name";

    public static final String ENCRYPT_TYPE = "encrypt_type";

    public static final String REQUEST_PUBLICKEY = "request_publickey";

    public static final String REQUEST_PRIVATEKEY = "request_privatekey";

    public static final String RESPONSE_PUBLICKEY = "response_publickey";

    public static final String RESPONSE_PRIVATEKEY = "response_privatekey";

    public static final String CREATED_BY = "created_by";

    public static final String CREATED_TIME = "created_time";

    public static final String UPDATED_BY = "updated_by";

    public static final String UPDATED_TIME = "updated_time";

    @Override
    public Serializable pkVal() {
        return this.configId;
    }
}
